package com.spider.iceCream;

import com.spider.iceCream.entity.Comments;
import com.spider.iceCream.spiderComponent.parse.GetReply;

import java.awt.*;
import java.util.List;
import java.util.concurrent.Callable;

/**
 * @author Lord
 * @date 2021/7/19 9:47
 */
public class CommentSpider implements Callable {
    private Integer oid;

    public CommentSpider(Integer oid) {
        this.oid = oid;
    }

    @Override
    public Comments call() throws Exception {
        GetReply getReply = new GetReply();
        Comments comments = new Comments();
        comments.setComments(getReply.allReply(oid));
        comments.setLength(comments.getComments().size());
        return comments;
    }
}
